Hide 64bit-mode feature on i386 hypervisor.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 16 Dec 2005 17:58:21 +0000 (18:58 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 16 Dec 2005 17:58:21 +0000 (18:58 +0100)
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
xen/arch/x86/vmx.c

index 521f5fe15e2cd8dcdbea105b12f5d9e7263d8cc2..29fb3d121fce1c27b80f0132171c3717e675b3d2 100644 (file)
@@ -544,6 +544,13 @@ static void vmx_vmexit_do_cpuid(unsigned long input, struct cpu_user_regs *regs)
         clear_bit(X86_FEATURE_VMXE & 31, &ecx);
         clear_bit(X86_FEATURE_MWAIT & 31, &ecx);
     }
+#ifdef __i386__
+    else if ( input == 0x80000001 )
+    {
+        /* Mask feature for Intel ia32e or AMD long mode. */
+        clear_bit(X86_FEATURE_LM & 31, &edx);
+    }
+#endif
 
     regs->eax = (unsigned long) eax;
     regs->ebx = (unsigned long) ebx;